cmake_minimum_required(VERSION 3.25)
project(Obj_Study6)

set(CMAKE_CXX_STANDARD 14)

add_executable(Obj_Study6 main.cpp Example/Exp1.cpp Example/Exp2.cpp Example/Exp3.cpp Example/Exp4.cpp)
add_executable(Exp1 Example/Exp1.cpp)
add_executable(Exp2 Example/Exp2.cpp)
add_executable(Exp3 Example/Exp3.cpp)
# 添加Object目录下的源文件
file(GLOB OBJECT_SOURCES "Object/*.cpp")
target_sources(Obj_Study6 PRIVATE ${OBJECT_SOURCES})

# 包含头文件目录
target_include_directories(Obj_Study6 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/Object)
add_executable(Exp4 Example/Exp4.cpp)
add_executable(Exp5 Example/Exp5.cpp)